home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Views / Pane Options / AcceptsConformanceToSize.h < prev    next >
Text File  |  2000-06-23  |  844b  |  44 lines

  1. // AcceptsConformanceToSize.h
  2.  
  3. #ifndef AcceptsConformanceToSize_h
  4. #define AcceptsConformanceToSize_h
  5.  
  6. #ifndef View_h
  7. #include "View.h"
  8. #endif
  9. #ifndef ConformsToPaneSize_h
  10. #include "ConformsToPaneSize.h"
  11. #endif
  12.  
  13. class AcceptsConformanceToSize
  14.   {
  15.     friend class ConformsToPaneSize;
  16.     
  17.     private:
  18.         UPoint32 paneSize;
  19.         bool paneSizeKnown;
  20.  
  21.         ConformsToPaneSize *conformingView;
  22.     
  23.         void SetConformingView( ConformsToPaneSize * );
  24.         
  25.         // not implemented:
  26.             AcceptsConformanceToSize( const AcceptsConformanceToSize& );
  27.             void operator=( const AcceptsConformanceToSize& );
  28.     
  29.     protected:
  30.         AcceptsConformanceToSize();
  31.         ~AcceptsConformanceToSize()                { Clear(); }
  32.         
  33.         void SetContent( View& view )
  34.           {
  35.             SetConformingView( dynamic_cast<ConformsToPaneSize*>( &view ) );
  36.           }
  37.         
  38.         void Clear();
  39.  
  40.         void AnnouncePaneSize( UPoint32 );
  41.   };
  42.  
  43. #endif
  44.